<%@page import="school.entity.Student"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page isELIgnored="false" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'EL1.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    This is my JSP page. <br>
    <%
    	pageContext.setAttribute("msg", "nihao");
    	request.setAttribute("msg", "panyongjian jintian qingjia le");
     	String []ar={"snake","dog","cat","cow"};
     	request.setAttribute("arr1", ar);
     	Student st=new Student();
     	st.setStuno(1000L);
     	st.setSname("张三");
     	request.setAttribute("st", st);
     	
     	Map<String,String> map=new HashMap<>();
     	map.put("dog","狗");
     	map.put("cat","猫");
     	map.put("cow","牛");
     	map.put("chicken","母鸡");
     	
     	request.setAttribute("map", map);
     %>
     <h1>
     ${msg},${notice}
     <%--
     	request.getAttribute("notice");
      --%>
      <br/>
      ${arr1[0]}--${arr1[1]}
     </h1>
     <h1>
     	${st.sname},,,${st.stuno},,,${a.b.c.f.h.i.g}
     </h1>
     <h2>
     ${empty a},${empty arr1},,${st.stuno/3}
     </h2>
     <h1>
    	data in request ${requestScope.msg}
     </h1>
     <hr/>
     <h1>${map.dog}</h1>
  </body>
</html>
